@extends('layouts.root')

@section('content')
    @if(count($datas) > 0)
        <table class="table table-hover">
        	<thead>
        		<tr>
        			<th>ID</th>
        			<th>标识</th>
        			<th>创建时间</th>
        			<th>更新时间</th>
        			<th>管理</th>
        		</tr>
        	</thead>
        	<tbody>
            @foreach($datas as $data)
                <tr>
                    <td>{{ $data->id }}</td>
                    <td>{{ $data->name }}</td>
                    <td>{{ $data->created_at }}</td>
                    <td>{{ $data->updated_at }}</td>
                    <td>
                        <a class="btn btn-primary btn-xs" href="{{ route('root.tags.edit', [$data->id]) }}">编辑</a>

                        <form action="{{ route('root.tags.destroy', [$data->id]) }}" method="post" style="display: inline">
                            {{ method_field('DELETE') }}
                            {{ csrf_field() }}
                            <button class="btn btn-danger btn-xs">删除</button>
                        </form>
                    </td>
                </tr>
            @endforeach
        	</tbody>
            <tfoot><tr><td colspan="5" class="text-center">{!! $datas->render() !!}</td></tr></tfoot>
        </table>
    @endif
@stop